/*     */ package com.amarsoft.task;
/*     */ 
/*     */ import java.util.EventObject;
/*     */ 
/*     */ public class TaskEvent extends EventObject
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   public static final int TASK_START = 0;
/*     */   public static final int TASK_EXIT = 1;
/*     */   public static final int TARGET_START = 2;
/*     */   public static final int TARGET_EXIT = 3;
/*     */   public static final int UNIT_START = 4;
/*     */   public static final int UNIT_EXIT = 5;
/*     */   public static final int TARGET_ADDED = 6;
/*     */   public static final int TARGET_REMOVED = 7;
/*     */   public static final int UNIT_ADDED = 8;
/*     */   public static final int UNIT_REMOVED = 9;
/*     */   public static final int ROUTE_ADDED = 10;
/*     */   public static final int ROUTE_REMOVED = 11;
/*     */   private int type;
/*     */   private Target target;
/*     */   private ExecuteUnit unit;
/*     */   private Route route;
/*     */ 
/*     */   public TaskEvent(Task source, int type, Target target, ExecuteUnit unit, Route route)
/*     */   {
/*  45 */     super(source);
/*     */ 
/*  31 */     this.type = 0;
/*  32 */     this.target = null;
/*  33 */     this.unit = null;
/*  34 */     this.route = null;
/*     */ 
/*  46 */     this.type = type;
/*  47 */     this.target = target;
/*  48 */     this.unit = unit;
/*  49 */     this.route = route;
/*     */   }
/*     */ 
/*     */   public TaskEvent(Task source, int type)
/*     */   {
/*  59 */     this(source, type, null, null, null);
/*     */   }
/*     */ 
/*     */   public TaskEvent(Task source, int type, Target target)
/*     */   {
/*  69 */     this(source, type, target, null, null);
/*     */   }
/*     */ 
/*     */   public TaskEvent(Task source, int type, Target target, ExecuteUnit unit)
/*     */   {
/*  80 */     this(source, type, target, unit, null);
/*     */   }
/*     */ 
/*     */   public int getType()
/*     */   {
/*  88 */     return this.type;
/*     */   }
/*     */ 
/*     */   public final Route getRoute()
/*     */   {
/*  96 */     return this.route;
/*     */   }
/*     */ 
/*     */   public final Target getTarget()
/*     */   {
/* 103 */     return this.target;
/*     */   }
/*     */ 
/*     */   public final Task getTask()
/*     */   {
/* 110 */     return ((Task)getSource());
/*     */   }
/*     */ 
/*     */   public final ExecuteUnit getUnit()
/*     */   {
/* 117 */     return this.unit;
/*     */   }
/*     */ }

/* Location:           D:\办公软件\反编译工具\jar\task-1.5beata_g.jar
 * Qualified Name:     com.amarsoft.task.TaskEvent
 * JD-Core Version:    0.5.3
 */